package com.penglecode.dp.creational.factory.general;

import com.penglecode.dp.creational.MailSender;
import com.penglecode.dp.creational.Sender;
import com.penglecode.dp.creational.SmsSender;
/**
 * 简单静态工厂方法模式
 * 
 * @author pengpeng
 * @date 2013-5-14上午10:13:35
 * @version 1.0
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class StaticMethodFactory {

	public static Sender createMailSender(){
		return new MailSender();
	}
	
	public static Sender createSmsSender(){
		return new SmsSender();
	}
	
	public static void main(String[] args) {
		Sender sender = StaticMethodFactory.createMailSender();
		sender.sendMessage();
	}
	
}
